import React from 'react';
import { Carousel, WingBlank } from 'antd-mobile';
import { carouselList } from '../const'
import styles from '../styles.less'

export default function Carousels() {
  return (
    <WingBlank>
      <div className={styles.carousWrapper}>
        <Carousel
          autoplay
          infinite
          autoplayInterval={2000}
        >
          {
            carouselList.map(({ url1, url2 }) => (
              <img
                src={`http://p1.music.126.net/${url1}==/${url2}.jpg?imageView&quality=89`}
                key={url2}
                alt="走马灯"
              />
            ))
          }
        </Carousel>
      </div>
    </WingBlank>
  )
}